package com.sixth.exceptionhandler;

import com.sixth.bean.common.BaseRespVo;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @ClassName IncorrectCredentialsExceptionAdvice
 * @Description TODO
 * @Author XiaoWJ
 * @Date 2022/9/12 16:20
 **/
@RestControllerAdvice
public class IncorrectCredentialsExceptionAdvice {

    @ExceptionHandler(IncorrectCredentialsException.class)
    public BaseRespVo incorrectCredentialsException (IncorrectCredentialsException exception) {

        return BaseRespVo.noLogin();

    }

}
